package com.mongo.wrapper;

import com.mongo.service.LambdaMongoQuery;
import com.mongo.service.MongoMapper;
import com.mongo.service.impl.LambdaGridQuery;
import com.mongo.service.impl.LambdaMongoUpdate;
import com.mongo.service.impl.LambdaQuery;


/**
 * mongo构造器
 * @author xiazhun
 * @create 2022/5/26
 */
public final class MongoWrappers {
    public static <T> LambdaMongoQuery<T> lambdaQuery(MongoMapper<T> mongoMapper){
        return new LambdaQuery<T>(mongoMapper);
    }

    public static <T> LambdaMongoQuery<T> lambdaQuery(){
        return new LambdaQuery<T>();
    }

    public static LambdaGridQuery lambdaGridQuery(){
        return new LambdaGridQuery();
    }

    public static <T> LambdaMongoUpdate<T> lambdaUpdate(){
        return new LambdaMongoUpdate<>();
    }


    public static <T> LambdaMongoUpdate<T> lambdaUpdate(MongoMapper<T> mongoMapper){
        return new LambdaMongoUpdate<>(mongoMapper);
    }
}
